package com.java8feature.java8action.chapter3;

import com.java8feature.java8action.chapter1.Apple;

import java.util.function.IntPredicate;

/**
 * @Description:
 * @Author: yangzhiwei
 * @Date: 2021/5/16 15:59
 */
public class FunctionInterface {
    public static void main(String[] args) {
        Apple apple = new Apple();
        IntPredicate predicate = (a) -> {
            System.out.println(apple.getColor());return a == 1;};
    }

    /**
     * (Integer i)-> return "Alan"+i
     * return 是一个控制流需要 使用花括号
     */
     Myfunction myfunction = (i)->  "Alan" + i;
}
